NOTE: This is a collection of information and links collected over the years that might provide useful information. A Safer Company LLC does not guarantee, endorse or approve any of these links or their scripts. Use these links to other websites at your own risk.
Notice: Undefined variable: message in /hermes/walnacweb03/walnacweb03af/b1896/as.asaferco/webdesign/Templates/code/dir_listing_enhanced.php on line 67
Notice: Undefined variable: message in /hermes/walnacweb03/walnacweb03af/b1896/as.asaferco/webdesign/Templates/code/dir_listing_enhanced.php on line 72
Warning: Use of undefined constant r - assumed 'r' (this will throw an Error in a future version of PHP) in /hermes/walnacweb03/walnacweb03af/b1896/as.asaferco/code/F_get_page_title_Enh.php on line 28
Notice: Undefined variable: print_file_data in /hermes/walnacweb03/walnacweb03af/b1896/as.asaferco/webdesign/Templates/code/dir_listing_enhanced.php on line 127
Warning: Use of undefined constant r - assumed 'r' (this will throw an Error in a future version of PHP) in /hermes/walnacweb03/walnacweb03af/b1896/as.asaferco/code/F_get_page_title_Enh.php on line 28
Warning: Use of undefined constant r - assumed 'r' (this will throw an Error in a future version of PHP) in /hermes/walnacweb03/walnacweb03af/b1896/as.asaferco/code/F_get_page_title_Enh.php on line 28
Warning: Use of undefined constant r - assumed 'r' (this will throw an Error in a future version of PHP) in /hermes/walnacweb03/walnacweb03af/b1896/as.asaferco/code/F_get_page_title_Enh.php on line 28
Warning: Use of undefined constant r - assumed 'r' (this will throw an Error in a future version of PHP) in /hermes/walnacweb03/walnacweb03af/b1896/as.asaferco/code/F_get_page_title_Enh.php on line 28
Notice: Undefined variable: print_folder_data in /hermes/walnacweb03/walnacweb03af/b1896/as.asaferco/webdesign/Templates/code/dir_listing_enhanced.php on line 160
Notice: Undefined variable: message in /hermes/walnacweb03/walnacweb03af/b1896/as.asaferco/webdesign/Templates/code/WebDesign_toc.php on line 12
Notice: Undefined variable: message in /hermes/walnacweb03/walnacweb03af/b1896/as.asaferco/webdesign/4_Physical_Design/Coding_HTML/Working with Images/photographs_html.html on line 247
Photographs for Websites
Photographs can add color in interest to a website. They can also provide information about size, shape and position, etc.
Photographs for a website can come from several places.
- The client may have photos they want you to use.
- The client may want you to take photographs for their website.
- You can also purchase photographs.
- You can find free photographs. Always be aware of copyrights.
Photographs for websites do not have to be very large. Digital cameras that can be used for taking photo for a website are very inexpensive. I recently purchased a 14.1 megapixel camera for less than $200.
Once you have taken the photo, they will need to be cropped, resized and maybe rotated.
Note: Use images carefully - Loading images take time, so limit the size and the number of images used on a web page.
Format
The best format for photographs is JPG which stands for Joint Photographic Experts Group.
Pros
- jpg files can contain 16.7 million colors (called 24-bit)
- jpg format is best for images that have subtle color changes, depth, lighting effects or other gradations of color or tone.
Cons
- jpg files can not be as compressed as other formats
HTML Code for Images
The code to add an image to a web page is:
<img src="url" alt="some_text"/>
For example:
<img src="images/asafercompany140.jpg" width="140" height="121" alt="A Safer Company LLC" />
- src - the source or URL of the image you want to display
- width and height should also be specified. If these attributes are set, the space required for the image is reserved when the page is loaded. However, without these attributes, the browser does not know the size of the image. The effect will be that the page layout will change during loading of the image.
- alt - should always be specified and should include meaningful information about the photograph. It provides alternative information for an image if a user cannot view the image because of slow connection, an error in the src attribute, or if the user uses a screen reader.
- align - determines where the image is places in relationship to the text around it.
Examples of Align
Centering Images
Images can be centered by using the HTML tag <center></center>:
<center><img src="images/asafercompany140.jpg" width="70" height="61" alt="A Safer Company LLC" /></center>

Warning: Use of undefined constant PHP_SELF - assumed 'PHP_SELF' (this will throw an Error in a future version of PHP) in /hermes/walnacweb03/walnacweb03af/b1896/as.asaferco/webdesign/4_Physical_Design/Coding_HTML/Working with Images/photographs_html.html on line 435
Page last updated: May 31, 2012 14:28 PM
Content and Navigation...